﻿using CommunityToolkit.Mvvm.ComponentModel;

using System.Collections.ObjectModel;

namespace StockUI.Model
{
   public partial class TreeDataModel : ObservableObject, ICloneable
    {
        [ObservableProperty]
        private bool isSelected;

        [ObservableProperty]
        private string code;

        [ObservableProperty]
        private string name;

        [ObservableProperty]
        private ObservableCollection<TreeDataModel> children = new ObservableCollection<TreeDataModel>();

        [ObservableProperty]
        private bool isExpanded;

        public object Clone()
        {
            return MemberwiseClone();
        }
    }
}
